<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>History</title>
</head>
<body>
    <button class="bt1">前进</button>
    <button class="bt2">后退</button>
    
    <script>
        const bt1 = document.querySelector('.bt1');
        bt1.addEventListener('click', ()=>{
            history.forward();
            history.back();
            history.go(-1);
        })
    </script>
</body>
</html>